home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / WINDOWS / EZNET.ZIP / DEMO.ZIP / WORKFLOW.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-10-31  |  12.0 KB  |  481 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H00FFFFFF&
  5.    Caption         =   "Example 1: WorkFlow"
  6.    ClientHeight    =   3915
  7.    ClientLeft      =   1170
  8.    ClientTop       =   1545
  9.    ClientWidth     =   5685
  10.    FillColor       =   &H0080FFFF&
  11.    BeginProperty Font 
  12.       name            =   "MS Sans Serif"
  13.       charset         =   0
  14.       weight          =   700
  15.       size            =   8.25
  16.       underline       =   0   'False
  17.       italic          =   0   'False
  18.       strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H80000008&
  21.    Height          =   4320
  22.    Left            =   1110
  23.    LinkTopic       =   "Form1"
  24.    MDIChild        =   -1  'True
  25.    ScaleHeight     =   3915
  26.    ScaleWidth      =   5685
  27.    Tag             =   "1"
  28.    Top             =   1200
  29.    Width           =   5805
  30.    Begin EasynetLib.Easynet Net1 
  31.       Height          =   2715
  32.       Left            =   240
  33.       TabIndex        =   3
  34.       Top             =   180
  35.       Width           =   5235
  36.       _Version        =   65538
  37.       _ExtentX        =   9234
  38.       _ExtentY        =   4789
  39.       _StockProps     =   101
  40.       BackColor       =   12648447
  41.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  42.          name            =   "MS Sans Serif"
  43.          charset         =   0
  44.          weight          =   400
  45.          size            =   8.25
  46.          underline       =   0   'False
  47.          italic          =   0   'False
  48.          strikethrough   =   0   'False
  49.       EndProperty
  50.       BorderStyle     =   1
  51.       xGrid           =   5
  52.       yGrid           =   5
  53.       Shape           =   0
  54.       FillColor       =   16777215
  55.       DrawColor       =   8421504
  56.       ForeColor       =   0
  57.       DrawWidth       =   1
  58.       Oriented        =   -1  'True
  59.       ReadOnly        =   0   'False
  60.       MultiSel        =   -1  'True
  61.       ScrollBars      =   3
  62.       CanDrawNode     =   -1  'True
  63.       CanDrawLink     =   -1  'True
  64.       CanMoveNode     =   -1  'True
  65.       CanSizeNode     =   -1  'True
  66.       CanStretchLink  =   -1  'True
  67.       CanMultiLink    =   0   'False
  68.       Transparent     =   0   'False
  69.       DrawStyle       =   6
  70.       Alignment       =   7
  71.       ShowGrid        =   0   'False
  72.       LinkHead        =   0
  73.       DoSelChange     =   -1  'True
  74.       DoAddNode       =   -1  'True
  75.       DoAddLink       =   -1  'True
  76.       Hiding          =   0   'False
  77.       ImageFile       =   ""
  78.       DisplayHandles  =   -1  'True
  79.       Zoom            =   100
  80.       AutoSize        =   0
  81.       AutoScroll      =   -1  'True
  82.    End
  83.    Begin VB.PictureBox Picture9 
  84.       Appearance      =   0  'Flat
  85.       BackColor       =   &H80000005&
  86.       ForeColor       =   &H80000008&
  87.       Height          =   585
  88.       Left            =   3570
  89.       Picture         =   "WORKFLOW.frx":0000
  90.       ScaleHeight     =   555
  91.       ScaleWidth      =   555
  92.       TabIndex        =   2
  93.       Top             =   3000
  94.       Visible         =   0   'False
  95.       Width           =   585
  96.    End
  97.    Begin VB.PictureBox Picture11 
  98.       Appearance      =   0  'Flat
  99.       BackColor       =   &H80000005&
  100.       ForeColor       =   &H80000008&
  101.       Height          =   585
  102.       Left            =   4800
  103.       Picture         =   "WORKFLOW.frx":030A
  104.       ScaleHeight     =   555
  105.       ScaleWidth      =   585
  106.       TabIndex        =   1
  107.       Top             =   3000
  108.       Visible         =   0   'False
  109.       Width           =   615
  110.    End
  111.    Begin VB.PictureBox Picture10 
  112.       Appearance      =   0  'Flat
  113.       BackColor       =   &H80000005&
  114.       ForeColor       =   &H80000008&
  115.       Height          =   585
  116.       Left            =   4170
  117.       Picture         =   "WORKFLOW.frx":0614
  118.       ScaleHeight     =   555
  119.       ScaleWidth      =   585
  120.       TabIndex        =   0
  121.       Top             =   3000
  122.       Visible         =   0   'False
  123.       Width           =   615
  124.    End
  125. Attribute VB_Name = "Form1"
  126. Attribute VB_Creatable = False
  127. Attribute VB_Exposed = False
  128. Option Explicit
  129. Dim n%, interflag%
  130. Private Sub banner1()
  131.   Dim Node() As Long
  132.   Dim crlf As String
  133.   interflag = False
  134.   crlf = Chr$(13) + Chr$(10)
  135.   ReDim Node(1 To 19)
  136.   With Net1
  137.     .AddNodeItem
  138.     .DrawColor = 32768
  139.     .FillColor = RGB(255, 255, 192)
  140.     .X1 = 1050
  141.     .X2 = 2355
  142.     .Y1 = 60
  143.     .Y2 = 1020
  144.     .Text = "Order Entry"
  145.     .Picture = Picture11.Picture
  146.     Node(1) = .item
  147.     .AddNodeItem
  148.     .DrawColor = 32768
  149.     .FillColor = 16777215
  150.     .X1 = 1470
  151.     .X2 = 1920
  152.     .Y1 = 1570
  153.     .Y2 = 2020
  154.     .Text = "and"
  155.     Node(2) = .item
  156.     .AddNodeItem
  157.     .DrawColor = 32768
  158.     .FillColor = 16777215
  159.     .X1 = 1425
  160.     .X2 = 1845
  161.     .Y1 = 4815
  162.     .Y2 = 5295
  163.     Node(3) = .item
  164.     .AddNodeItem
  165.     .Shape = 2
  166.     .DrawColor = 32768
  167.     .FillColor = 8454143
  168.     .X1 = 245
  169.     .X2 = 1360
  170.     .Y1 = 3285
  171.     .Y2 = 3810
  172.     .Text = "Inventory Check"
  173.     Node(4) = .item
  174.     .AddNodeItem
  175.     .Shape = 2
  176.     .DrawColor = 32768
  177.     .FillColor = 8454143
  178.     .X1 = 2070
  179.     .X2 = 3345
  180.     .Y1 = 2700
  181.     .Y2 = 3165
  182.     .Text = "Compile Reference"
  183.     Node(5) = .item
  184.     .AddNodeItem
  185.     .Shape = 2
  186.     .DrawColor = 32768
  187.     .FillColor = 8454143
  188.     .X1 = 2070
  189.     .X2 = 3345
  190.     .Y1 = 3960
  191.     .Y2 = 4395
  192.     .Text = "Evaluate Reference"
  193.     Node(6) = .item
  194.     .AddNodeItem
  195.     .Shape = 3
  196.     .DrawColor = 32768
  197.     .FillColor = 12632256
  198.     .X1 = 2460
  199.     .X2 = 2940
  200.     .Y1 = 4800
  201.     .Y2 = 5280
  202.     .Text = "or"
  203.     Node(7) = .item
  204.     .AddNodeItem
  205.     .Shape = 3
  206.     .DrawColor = 32768
  207.     .FillColor = 12632256
  208.     .X1 = 1380
  209.     .X2 = 1860
  210.     .Y1 = 6390
  211.     .Y2 = 6870
  212.     .Text = "or"
  213.     Node(8) = .item
  214.     .AddNodeItem
  215.     .Shape = 2
  216.     .DrawColor = 32768
  217.     .FillColor = 8454143
  218.     .X1 = 1050
  219.     .X2 = 2200
  220.     .Y1 = 5620
  221.     .Y2 = 6150
  222.     .Text = "Order Evaluation"
  223.     Node(9) = .item
  224.     .AddNodeItem
  225.     .Shape = 2
  226.     .DrawColor = 32768
  227.     .FillColor = 8454143
  228.     .X1 = 30
  229.     .X2 = 1395
  230.     .Y1 = 7275
  231.     .Y2 = 8190
  232.     .Text = "Letter of regret"
  233.     .Picture = Picture9.Picture
  234.     Node(10) = .item
  235.     .AddNodeItem
  236.     .Shape = 2
  237.     .DrawColor = 32768
  238.     .FillColor = 8454143
  239.     .X1 = 2010
  240.     .X2 = 3195
  241.     .Y1 = 7425
  242.     .Y2 = 7815
  243.     .Text = "Billing"
  244.     Node(11) = .item
  245.     .AddNodeItem
  246.     .Shape = 2
  247.     .DrawColor = 32768
  248.     .FillColor = 8454143
  249.     .X1 = 2025
  250.     .X2 = 3195
  251.     .Y1 = 8310
  252.     .Y2 = 8685
  253.     .Text = "Shipping"
  254.     Node(12) = .item
  255.     .AddNodeItem
  256.     .DrawColor = 32768
  257.     .FillColor = RGB(255, 255, 192)
  258.     .X1 = 1080
  259.     .X2 = 2190
  260.     .Y1 = 9505
  261.     .Y2 = 10420
  262.     .Text = "Archive"
  263.     .Picture = Picture10.Picture
  264.     Node(13) = .item
  265.     .item = 0
  266.     .Shape = 2
  267.     .DrawColor = RGB(0, 0, 255)
  268.     .AddNodeItem
  269.     .Transparent = -1
  270.     .Type = 2
  271.     .FillColor = 15269887
  272.     .X1 = 45
  273.     .X2 = 1260
  274.     .Y1 = 1135
  275.     .Y2 = 1775
  276.     .Text = "Jane" + crlf + "INVENTORY MANAGER"
  277.     Node(15) = .item
  278.     .AddNodeItem
  279.     .Transparent = -1
  280.     .Type = 2
  281.     .FillColor = 15269887
  282.     .X1 = 2915
  283.     .X2 = 3930
  284.     .Y1 = 1110
  285.     .Y2 = 1635
  286.     .Text = "Paul" + crlf + "SECRETARY"
  287.     Node(16) = .item
  288.     .AddNodeItem
  289.     .Transparent = -1
  290.     .Type = 2
  291.     .FillColor = 15269887
  292.     .X1 = 3000
  293.     .X2 = 4000
  294.     .Y1 = 5640
  295.     .Y2 = 6120
  296.     .Text = "Lydia" + crlf + "SECRETARY"
  297.     Node(17) = .item
  298.     .AddNodeItem
  299.     .DrawStyle = 2
  300.     .Transparent = -1
  301.     .Type = 2
  302.     .FillColor = 15269887
  303.     .X1 = 3410
  304.     .X2 = 4010
  305.     .Y1 = 7770
  306.     .Y2 = 8310
  307.     .Text = "Bill"
  308.     Node(18) = .item
  309.     .AddNodeItem
  310.     .Transparent = -1
  311.     .Type = 2
  312.     .FillColor = 15269887
  313.     .X1 = 105
  314.     .X2 = 945
  315.     .Y1 = 9030
  316.     .Y2 = 9630
  317.     .Text = "Jack" + crlf + "ARCHIVER"
  318.     Node(19) = .item
  319.     .AddLinkItem Node(1), Node(2)
  320.     .DrawColor = 32768
  321.     .DrawStyle = 0
  322.     .AddLinkItem Node(2), Node(4)
  323.     .DrawColor = 32768
  324.     .DrawStyle = 0
  325.     .PointCount = 1
  326.     .PointX(0) = 795
  327.     .PointY(0) = 2130
  328.     .AddLinkItem Node(5), Node(6)
  329.     .DrawColor = 32768
  330.     .DrawStyle = 0
  331.     .AddLinkItem Node(4), Node(3)
  332.     .DrawColor = 32768
  333.     .DrawStyle = 0
  334.     .PointCount = 1
  335.     .PointX(0) = 795
  336.     .PointY(0) = 5040
  337.     .AddLinkItem Node(6), Node(7)
  338.     .DrawColor = 32768
  339.     .DrawStyle = 0
  340.     .AddLinkItem Node(7), Node(3)
  341.     .DrawColor = 32768
  342.     .DrawStyle = 0
  343.     .Text = "Yes"
  344.     .AddLinkItem Node(3), Node(9)
  345.     .DrawColor = 32768
  346.     .DrawStyle = 0
  347.     .AddLinkItem Node(9), Node(8)
  348.     .DrawColor = 32768
  349.     .DrawStyle = 0
  350.     .AddLinkItem Node(8), Node(10)
  351.     .DrawColor = 32768
  352.     .DrawStyle = 0
  353.     .PointCount = 1
  354.     .PointX(0) = 705
  355.     .PointY(0) = 6795
  356.     .Text = "Reject"
  357.     .AddLinkItem Node(8), Node(11)
  358.     .DrawColor = 32768
  359.     .DrawStyle = 0
  360.     .PointCount = 1
  361.     .PointX(0) = 2595
  362.     .PointY(0) = 6795
  363.     .Text = "Accept"
  364.     .AddLinkItem Node(11), Node(12)
  365.     .DrawColor = RGB(0, 0, 255)
  366.     .DrawStyle = 0
  367.     .AddLinkItem Node(12), Node(13)
  368.     .DrawColor = 32768
  369.     .DrawStyle = 0
  370.     .AddLinkItem Node(10), Node(13)
  371.     .DrawColor = 32768
  372.     .DrawStyle = 0
  373.     .AddLinkItem Node(2), Node(5)
  374.     .DrawColor = 32768
  375.     .DrawStyle = 0
  376.     .PointCount = 1
  377.     .PointX(0) = 2700
  378.     .PointY(0) = 2115
  379.     .AddLinkItem Node(7), Node(5)
  380.     .DrawColor = 32768
  381.     .DrawStyle = 0
  382.     .PointCount = 2
  383.     .PointX(0) = 4020
  384.     .PointY(0) = 5040
  385.     .PointX(1) = 4020
  386.     .PointY(1) = 2925
  387.     .Text = "No"
  388.     ' default properties for the end
  389.     .item = 0
  390.     .DrawStyle = 0
  391.     .DrawWidth = 1
  392.     .Shape = 2
  393.     .Transparent = True
  394.     interflag = True
  395.     ' Now continue
  396.     .AddLinkItem Node(15), Node(1)
  397.     .AddLinkItem Node(16), Node(5)
  398.     .AddLinkItem Node(16), Node(6)
  399.     .AddLinkItem Node(15), Node(4)
  400.     .PointCount = 1
  401.     .PointX(0) = 450
  402.     .PointY(0) = 2460
  403.     .AddLinkItem Node(17), Node(9)
  404.     .AddLinkItem Node(18), Node(11)
  405.     .DrawStyle = 2
  406.     .AddLinkItem Node(18), Node(12)
  407.     .DrawStyle = 2
  408.     .AddLinkItem Node(19), Node(10)
  409.     .AddLinkItem Node(19), Node(13)
  410.     ' Unselect last created link
  411.     .item = 0
  412.   End With
  413. End Sub
  414. Private Sub Form_Activate()
  415.   ActivateForm
  416. End Sub
  417. Private Sub Form_Deactivate()
  418.   DeactivateForm
  419. End Sub
  420. Private Sub Form_Load()
  421.   MDI1.ShowExample(0).Enabled = False
  422.   Net1.Left = 0
  423.   Net1.Top = 0
  424.   SpeedON Net1
  425.   banner1
  426.   SpeedOFF Net1
  427. End Sub
  428. Private Sub Form_Resize()
  429.   If WindowState <> 1 And ScaleHeight <> 0 Then
  430.     Net1.Height = ScaleHeight
  431.     Net1.Width = ScaleWidth
  432.   End If
  433. End Sub
  434. Private Sub Form_Unload(Cancel As Integer)
  435.   MDI1.ShowExample(0).Enabled = True
  436.   MDI1.Command5.Enabled = False
  437.   MDI1.Command5.Caption = "Comments "
  438. End Sub
  439. Private Sub Net1_AddLink()
  440.   If interflag = True Then
  441.     Net1.Type = 2
  442.     Net1.LinkHead = 1
  443.   End If
  444. End Sub
  445. Private Sub Net1_AddNode()
  446.   If Net1.X2 - Net1.X1 < 200 Then Net1.X2 = Net1.X1 + 200
  447.   If Net1.Y2 - Net1.Y1 < 200 Then Net1.Y2 = Net1.Y1 + 200
  448.   If interflag = True Then
  449.     Net1.Type = 2
  450.   End If
  451. End Sub
  452. Private Sub Net1_DblClick()
  453.   If Net1.item <> 0 Then
  454.     If Net1.IsLink = False Then
  455.       If Net1.Type = 2 Then
  456.         Dim s$
  457.         Dim pos%
  458.         s = Net1.Text
  459.         pos = InStr(s, Chr$(13))
  460.         If pos = 0 Then
  461.           Actor = s
  462.           Role = ""
  463.         Else
  464.           Actor = Left$(s, pos - 1)
  465.           Role = Mid$(s, pos + 2)
  466.         End If
  467.         frmTask.Show 1
  468.         Net1.Text = Actor + Chr$(13) + Chr$(10) + Role
  469.       End If
  470.     End If
  471.   End If
  472. End Sub
  473. Private Sub Net1_KeyDown(KeyCode As Integer, Shift As Integer)
  474.   If KeyCode = KEY_DELETE Then
  475.     Net1.DeleteSel
  476.   End If
  477. End Sub
  478. Private Sub Net1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  479.   CursorShape Net1
  480. End Sub
  481.